package com.bdqn.t382.practice;

public class TestValidate {
    public static void main(String[] args) {
        ValidatorService service = (ValidatorService) ValidationProxy.newInstance(new ValidatorServiceImpl());
        try {
            service.validateParameter(5.5); // 成功
            service.validateParameter(-1.0); // 失败
            service.validateParameter(11.0); // 失败
            service.validateParameter(null); // 失败(如果启用了 notEmpty 校验)
        } catch (ValidationException e) {
            System.err.println("Validation failed: " + e.getMessage());
        }
    }
}
